﻿
@{
    List<Pro_LandModel> lstLand = ViewBag.lstLand != null ? (List<Pro_LandModel>)ViewBag.lstLand : new List<Pro_LandModel>();

    foreach (Pro_LandModel item in lstLand)
    {
        if(item != null){
        var imgUrl = "../../Content/Image/admin/noImage.png";
        if (item.LandImage != null)
        {
            imgUrl = "../Uploads/" + item.LandImage;
        }
        
        <div class="landItem Clearfix" onclick="openLandDetail('@item.url');">
            <div class="divTitleLand"><h1> @item.LandName</h1></div>
            <div class="Clearfix">                
                <div class="LandDesc">
                    <img src="@imgUrl" class="imgLand" alt="batdongsan" />
                    @Html.Raw(item.Description)
                </div>
                <div class="divLandInfo">
                    <div>
                        <span>Ngày đăng :</span> @String.Format("{0:d/MM/yyyy HH:mm}", item.CreateDate)
                     </div>
                     <div>
                        <span>Diện tích :</span> @item.LandSquare
                     </div>
                     <div>
                        <span>Giá :</span> @item.LandPrice
                     </div>
                </div>
                <div style="clear:both;"></div>
            </div>
        </div>
        }
    
    }
    
    }



     <script type="text/javascript">
         function openLandDetail(url) {
             window.location = "/san-giao-dich/" + url;
         }

        </script>
